package com.example.demo.config.shiro;

import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;
import org.apache.shiro.cache.CacheManager;

/**
 * @Author: yucs
 * @Date: 2021/9/1 22:28
 * 为shiro添加redis缓存
 * 自定义shiro缓存管理器
 */
public class RedisCacheManager implements CacheManager {
    @Override
    public <K, V> Cache<K, V> getCache(String s) throws CacheException {
        System.out.println(s);
        return new RedisCache<K,V>();
    }
}
